package com.atguigu;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @author cyd
 * @version 1.0.0
 * @date 2021/11/16 10:37
 */
@SpringBootApplication
@EnableEurekaClient
public class GateWayMain9527 {
    private static ConfigurableApplicationContext context;

    public static void main(String[] args) {
        context = SpringApplication.run(GateWayMain9527.class, args);
        System.out.println("--------------项目启动了---------------");
        ConfigurableEnvironment environment = context.getEnvironment();
        String port = environment.getProperty("server.port");
        System.out.println(port);
        System.out.println("http://localhost:" + port + "/payment/get/1");
        System.out.println("http://localhost:" + port + "/guonei");
        System.out.println("http://localhost:" + port + "/payment/lb");
    }
}
